package com.ruoyi.system.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.vo.BillingRulesVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BillingRulesMapper;
import com.ruoyi.system.domain.BillingRules;
import com.ruoyi.system.service.IBillingRulesService;

/**
 * 计费规则Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-19
 */
@Service
public class BillingRulesServiceImpl extends ServiceImpl<BillingRulesMapper, BillingRules> implements IBillingRulesService
{
    @Autowired
    private BillingRulesMapper billingRulesMapper;

    /**
     * 通过id查询计费规则
     *
     * @param id 计费规则主键
     * @return 计费规则
     */
    @Override
    public BillingRulesVO selectBillingRulesById(Long id)
    {
        return billingRulesMapper.selectBillingRulesById(id);
    }

    /**
     * 查询计费规则列表
     *
     * @param billingRules 计费规则
     * @return 计费规则
     */
    @Override
    public List<BillingRulesVO> selectBillingRulesList(BillingRulesVO billingRules)
    {
        return billingRulesMapper.selectBillingRulesList(billingRules);
    }

    /**
     * 新增计费规则
     *
     * @param billingRules 计费规则
     * @return 结果
     */
    @Override
    public int insertBillingRules(BillingRulesVO billingRules)
    {
        return billingRulesMapper.insertBillingRules(billingRules);
    }

    /**
     * 修改计费规则
     *
     * @param billingRules 计费规则
     * @return 结果
     */
    @Override
    public int updateBillingRules(BillingRulesVO billingRules)
    {
        return billingRulesMapper.updateBillingRules(billingRules);
    }

    /**
     * 通过id批量删除计费规则信息
     *
     * @param ids 需要删除的计费规则主键
     * @return 结果
     */
    @Override
    public int deleteBillingRulesByIds(Long[] ids)
    {
        return billingRulesMapper.deleteBillingRulesByIds(ids);
    }

    /**
     * 通过id删除计费规则信息
     *
     * @param id 计费规则主键
     * @return 结果
     */
    @Override
    public int deleteBillingRulesById(Long id)
    {
        return billingRulesMapper.deleteBillingRulesById(id);
    }
}
